package com.sky.controller.user;

import com.sky.result.Result;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RequestMapping("/user/shop")
@RestController("UserShopController")
public class ShopController {
    @Resource
    private StringRedisTemplate stringRedisTemplate;

    @GetMapping("/status")
    public Result status(){
        String s = stringRedisTemplate.opsForValue().get("shop:status");
        Integer status = Integer.valueOf(s);
        return Result.success(status);
    }
}
